<div class="content-section implementation GridDemo clearfixes constructionOverview">
  <div class="ui-g">
    <div class="ui-g-12 ui-md-12 ui-lg-12">
      <div class="mysearch">
        <div class="ui-g">
          <div class="ui-g-5 ui-sm-12 ui-lg-3 ">
            <label class="ui-g-5 ui-sm-6 ui-lg-3 text-right" >上架单号:</label>
            <div class="ui-g-5 ui-sm-6 ui-lg-8  ui-fluid">
              <input pInputText type="text" name="sid" placeholder="上架单号" [(ngModel)]="queryModel.condition.sid" />
            </div>
          </div>
          <div class="ui-g-5 ui-sm-12 ui-lg-3 ">
            <label class="ui-g-5 ui-sm-6 ui-lg-3 text-right" >申请人:</label>
            <div class="ui-g-5 ui-sm-6 ui-lg-8  ui-fluid">
              <input pInputText type="text" name="sid" placeholder="申请人" [(ngModel)]="queryModel.condition.applicant" />
            </div>
          </div>
          <div class="ui-g-5 ui-sm-12 ui-lg-3 ">
            <label class="ui-g-5 ui-sm-6 ui-lg-3 text-right" >状态:</label>
            <div class="ui-g-5 ui-sm-6 ui-lg-8  ui-fluid">

              <p-dropdown [options]="StatusData" [(ngModel)]="queryModel.condition.status" [autoWidth]="false" name="cycle" (onChange)="suggestInsepectiones()" ></p-dropdown>
            </div>
          </div>
          <div class="ui-g-5 ui-sm-12 ui-lg-3 ">
          <div class="ui-g-12 ui-sm-12 ui-lg-12 ">
            <button pButton type="button" label="查询" ngClass="ui-sm-12" (click)="suggestInsepectiones()" ></button>
            <button pButton  label="清空" ngClass="ui-sm-12"  (click)="clearSearch()"></button>
          </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="ui-g">
     <div class="ui-g-12 ui-md-12 ui-lg-12">
      <p-dataTable [value]="shelfviewData"
                   [totalRecords]="totalRecords"  [(selection)]="selectMaterial" >
        <p-column  field="sid" header="上架单号" [sortable]="true" >
          <ng-template let-data="rowData" pTemplate="body" let-i="rowIndex">
            <span (click)="viewShelf(data)" class="curser">{{data.sid}}</span>
          </ng-template>
        </p-column>
        <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}"  [sortable]="true"></p-column>
        <ng-template pTemplate="emptymessage">
          当前没有数据
        </ng-template>
        <p-column header="操作">
          <ng-template let-car="rowData" pTemplate="body" let-i="rowIndex">
            <button pButton type="button"  label="编辑"  *ngIf="shelfviewData[i]['status_code'] === 'new'|| shelfviewData[i]['status_code'] === 'reject' "  (click)="viewUpdate(shelfviewData[i])" ></button>
            <button pButton type="button"  label="删除"  *ngIf="shelfviewData[i]['status_code'] === 'new'"  (click)="viewDelete(shelfviewData[i])" ></button>
            <button pButton type="button"  label="审批"  *ngIf="shelfviewData[i]['status_code'] === 'approve'"  (click)="viewApprove(shelfviewData[i])" ></button>
            <button pButton type="button"  label="上架"   *ngIf="shelfviewData[i]['status_code'] === 'await'" (click)="viewComplyshelf(shelfviewData[i])" ></button>
            <button pButton type="button"  label="完成上架"   *ngIf="shelfviewData[i]['status_code'] === 'awaiting'" (click)="viewComplateshelf(shelfviewData[i])" ></button>
            <button pButton type="button"  label="复核"   *ngIf="shelfviewData[i]['status_code'] === 'auditor'" (click)="viewReviewshelf(shelfviewData[i])" ></button>
            <button pButton type="button"  label="上架调整"   *ngIf="shelfviewData[i]['status_code'] === 'adjust'" (click)="viewRectificationshelf(shelfviewData[i])" ></button>
            <button pButton type="button"  label="查看" (click)="viewShelf(shelfviewData[i])"  ></button>
          </ng-template>
        </p-column>
      </p-dataTable>
      <p-paginator rows="10" [totalRecords]="totalRecords" [rowsPerPageOptions]="[10,20,30]" (onPageChange)="paginate($event)"></p-paginator>
    </div>
  </div>
</div>



